package com.baihan.angus.app.game.busshow.ui.user.upgrade.dm;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.baihan.angus.app.game.basic.base.BaseActivity;
import com.baihan.angus.app.game.basic.utils.Tooast;
import com.baihan.angus.app.game.busshow.BR;
import com.baihan.angus.app.game.busshow.R;
import com.baihan.angus.app.game.busshow.databinding.ActivityDmfirstBinding;
import com.baihan.angus.app.game.common.arouter_path.ArouterAppPath;

/**
 * 升级DM
 */
@Route(path = ArouterAppPath.DM_FIRST_ACTIVITY)
public class DMFirstActivity extends BaseActivity<ActivityDmfirstBinding, DMFirstVM> {

    @Autowired(name = "verifyId")
    String verifyId;

    @Override
    protected int getContentLayout() {
        return R.layout.activity_dmfirst;
    }

    @Override
    protected int getViewModelId() {
        return BR.dmFirstVM;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        mVDBinding.titleView.setLeftOnClickListener(view -> finish());

        mVDBinding.tvAgreement.setOnClickListener(view -> {

        });

        mVDBinding.tvNext.setOnClickListener(view -> {
            if (mViewModel.ofAgreePrivacy.get()) {
                ARouter.getInstance().build(ArouterAppPath.DM_SECOND_ACTIVITY).withString("verifyId", verifyId).navigation();
                finish();
            } else {
                Tooast.normalInfo("请先勾选用户协议");
            }
        });
    }
}